package jd;

public class PublicType {
	public String id;
	public String name;
	boolean inited = false;
	
	void init() {
		if (inited == true)
			return;

		if (id == null)
			id = "";
		id = id.replaceAll("'", "''");

		if (name == null)
			name = "";
		name = name.replaceAll("'", "''");

		inited = true;
	}

	public String to_str() {
		String ret;

		init();

		ret = String.format("'%s', '%s'", id, name);
		return ret;
	}

	public String to_cond() {
		String ret;

		init();

		ret = String.format("pid='%s' AND name='%s'", id, name);
		return ret;
	}
}


